var e = require;
var t = module;
var o = exports;
var n = o;
Object.defineProperty(n, "__esModule", {value: !0});
var i = (function () {
    function e() {
        (this._customStyle = null),
            (this._blockDisplayState = !1),
            (this._blockDisplayTag = !0),
            (this._isLoadComplete = !1),
            (this._loadAutoShow = !1),
            (this._isConsume = !1),
            (this._onLoadCallbackRef = null),
            (this._onResizeCallbackRef = null),
            (this._onErrorCallbackRef = null);
    }
    return (
        (e.prototype.init = function () {
            console.log("block init"),
                (this._onLoadCallbackRef = this.onBlockLoad.bind(this)),
                (this._onResizeCallbackRef = this.onBlockResize.bind(this)),
                (this._onErrorCallbackRef = this.onBlockError.bind(this)),
                this.createBlock(!1);
        }),
        (e.prototype.showBlock = function (e, t) {
            console.log("showBlock", e),
                (this._customStyle = e),
                (this._showCallback = t),
                (this._blockDisplayState = !0);
        }),
        (e.prototype.hideBlock = function (e) {
            console.log("hideBlock", e), (this._blockDisplayState = !1), (this._showCallback = null);
        }),
        (e.prototype.setBlockDisplayTag = function (e) {
            if ((console.log("setBlockDisplayTag", e), this._blockDisplayTag != e))
                if (((this._blockDisplayTag = e), e))
                    this._blockDisplayState && this.showBlock(this._customStyle, this._showCallback);
                else {
                    var t = this._blockDisplayState;
                    this.hideBlock(!1), (this._blockDisplayState = t);
                }
        }),
        (e.prototype.destroyBlock = function () {
            console.log("destoryBlock"),
                (this._customStyle = null),
                (this._showCallback = null),
                (this._blockDisplayState = !1),
                (this._isLoadComplete = !1),
                (this._loadAutoShow = !1),
                (this._isConsume = !1);
        }),
        e
    );
})();
n.default = i;
